"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const taro_1 = require("@tarojs/taro");
const components_1 = require("@tarojs/components");
const taro_ui_1 = require("taro-ui");
const man_svg_1 = require("./man.svg");
const position_svg_1 = require("./position.svg");
require("./Profile.scss");
class default_1 extends taro_1.Component {
    constructor() {
        super(...arguments);
        this.config = {
            navigationBarTitleText: '我的收货地址'
        };
        this.onAddPhoneContact = () => {
            // 手机联系人
            taro_1.default.addPhoneContact({})
                .then(res => console.log('手机联系人', res))
                .catch(e => console.log(e));
        };
        this.onGetLocation = () => {
            // 获取位置
            taro_1.default.chooseLocation()
                .then(res => console.log('获取位置', res))
                .catch(e => console.log(e));
        };
    }
    componentWillReceiveProps(nextProps) {
        console.log(this.props, nextProps);
    }
    componentWillUnmount() { }
    componentWillMount() {
        // 详情页 ID
        console.log(this.$router.params, 123321);
    }
    componentDidShow() { }
    componentDidHide() { }
    render() {
        return (<components_1.View className='addressProfile'>
        <components_1.View className='cell'>
          <components_1.View className='label'>
            <components_1.Text className='text'>收货人</components_1.Text>
          </components_1.View>
          <components_1.View className='content'>
            <components_1.Input type='text' placeholder='姓名' className='edit' focus/>
          </components_1.View>
          <components_1.Image src={man_svg_1.default} className='navigate' onClick={this.onAddPhoneContact.bind(this, 0)}/>
        </components_1.View>
        <components_1.View className='cell'>
          <components_1.View className='label'>
            <components_1.Text className='text'>手机号码</components_1.Text>
          </components_1.View>
          <components_1.View className='content'>
            <components_1.Input type='number' placeholder='请输入11位手机号' className='edit'/>
          </components_1.View>
        </components_1.View>
        <components_1.View className='cell'>
          <components_1.View className='label'>
            <components_1.Text className='text'>地区信息</components_1.Text>
          </components_1.View>
          <components_1.View className='content'>
            <components_1.Textarea placeholder='地区信息' className='edit' value='' autoHeight/>
          </components_1.View>
          <components_1.Image src={position_svg_1.default} className='navigate' onClick={this.onGetLocation.bind(this, 0)}/>
        </components_1.View>
        <components_1.View className='cell'>
          <components_1.View className='label'>
            <components_1.Text className='text'>详细地址</components_1.Text>
          </components_1.View>
          <components_1.View className='content'>
            <components_1.Textarea placeholder='请输入街道门牌号' className='edit' value='' autoHeight/>
          </components_1.View>
        </components_1.View>
        <components_1.View className='cell'>
          <components_1.View className='label'>
            <components_1.Text className='text'>邮政编码</components_1.Text>
          </components_1.View>
          <components_1.View className='content'>
            <components_1.Input type='number' placeholder='请输入邮政编码' className='edit'/>
          </components_1.View>
        </components_1.View>
        <components_1.View className='buttonFix'>
          <taro_ui_1.AtButton type='primary'>提交</taro_ui_1.AtButton>
        </components_1.View>
      </components_1.View>);
    }
}
exports.default = default_1;
//# sourceMappingURL=Profile.jsx.map